package com.example.domain;

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * @author 袁小弘
 * @describe 培训中心学生管理————证书类
 * @date 2019-12-17 9:34
 */
@Entity
@Table(name = "certificate")
public class Certificate implements Serializable {

    private static final long serialVersionUID = 1106629781861651119L;

    @Id
    @GeneratedValue
    @Column(name = "certificate_Id")
    private Integer certificateId;//证书ID

    @Column(name = "user_Id")
    private Integer userId;//用户ID

    @Column(name = "name", length = 32)
    private String name;//证书名称

    @Column(name = "time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp time;//获取证书时间

    @Column(name = "comment", length = 255)
    private String comment;//备注说明

    @Column(name = "recordTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp recordTime;//创建记录时间

    @Column(name = "updateTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp updateTime;//更新记录时间

    public Certificate() {
        //无参构造
    }

    public Integer getCertificateId() {
        return certificateId;
    }

    public void setCertificateId(Integer certificateId) {
        this.certificateId = certificateId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Timestamp getTime() {
        return time;
    }

    public void setTime(Timestamp time) {
        this.time = time;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public Timestamp getRecordTime() {
        return recordTime;
    }

    public void setRecordTime(Timestamp recordTime) {
        this.recordTime = recordTime;
    }

    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "Certificate [certificateId=" + certificateId + ", userId=" + userId + ", name=" + name + ", time="
                + time + ", comment=" + comment + ", recordTime=" + recordTime + ", updateTime=" + updateTime + "]";
    }


}
